<{include file="top.html" }>
</head>
<body>
<header><a class="left_link" href="javascript:void(0);"></a>我的活动</header>
<ul class="hyhd_box">
    <{include file="Events/more.html" }>
</ul>
<{include file="signBody.html"}>
</body>
</html>
<script type="text/javascript" src="<{$preStaticUrl}>js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="<{$preStaticUrl}>js/jquery.touchSlider.js"></script>
<script type="text/javascript">
    var loadMore = "<{U('Events/loadMore')}>&my=1";
    var page = 2;
    var loadFlag = 1;

    $(function(){
        $(window).scroll(function() {
            //当内容滚动到底部时加载新的内容
            if ($(this).scrollTop() + $(window).height() + 20 >= $(document).height() && $(this).scrollTop() > 20) {
                //当前要加载的页码
                if(loadFlag) {
                    loadFlag = 0;
                    loadObj = layer.load(2);
                    $.getJSON(loadMore, {page: page}, function (data) {
                        layer.close(loadObj);
                        if (data.status != 0) {
                            layer.msg("数据获取失败，请稍后重试或联系管理员解决！");
                        } else {
                            ++page;
                            $(".hyhd_box").append(data.dataHTML);
                            if (data.isPage) loadFlag = 1;
                        }
                    });
                }
            }
        });
    });

    var muhandle =null;
    function init_mu_timer(){ //递减 class = mutimer 的元素
        if(muhandle != null)	clearInterval(muhandle);
        muhandle	= setInterval("refresh_mu_timer()",999);
    }
    //时间递减队列
    function refresh_mu_timer(){
        var obj	= $(".mutimer");
        var l	= obj.size();
        if(l>0){
            for(var i=0;i<l;i++){
                var _that = obj[i];
                time = $(_that).attr('data-time');
                time	= time-1;
                obj[i].innerHTML ="倒计时: "+print_time(time);
                $(obj[i]).attr('data-time', time);
            }
        }else{
            clearInterval(muhandle);
        }
    }

</script>
